<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Publish a Pack</title>
<title>CMSIS-Pack: Publish a Pack</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="cmsis.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="printComponentTabs.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 46px;">
  <td id="projectlogo"><img alt="Logo" src="CMSIS_Logo_Final.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">CMSIS-Pack
   &#160;<span id="projectnumber">Version 1.6.1</span>
   </div>
   <div id="projectbrief">Delivery Mechanism for Software Packs</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<div id="CMSISnav" class="tabs1">
    <ul class="tablist">
      <script type="text/javascript">
		<!--
		writeComponentTabs.call(this);
		//-->
      </script>
	  </ul>
</div>
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('createPackPublish.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="PageDoc"><div class="header">
  <div class="headertitle">
<div class="title">Publish a Pack </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>There are multiple ways to distribute a software pack:</p>
<h1><a class="anchor" id="cp_prerequisites"></a>
Prerequisites</h1>
<p>Before you start to distribute a software pack, you need to make sure that it does not contain errors. A good start is an error and warning free run of:</p><ul>
<li><code>gen_pack.bat</code> script from the <a class="el" href="cp_Packs.html#PackTutorials">Pack Tutorial</a></li>
<li>or <a class="el" href="bash_script.html">Bash Script gen_pack.sh</a> that does not show any <a class="el" href="packChk.html">packChk</a> errors.</li>
</ul>
<p>Also you should perform an XML schema check, for example using the MDK Pack Installer.</p>
<ul>
<li>Right-click on the pack version number and select <b>Schema Check</b>: <br  />
 <div class="image">
<img src="schema_check.png" alt=""/>
</div>
</li>
<li>The <b>Output</b> window shows the result. If errors are reported, please make sure to fix them before continuing.<br  />
 <div class="image">
<img src="schema_check_output.png" alt=""/>
</div>
</li>
</ul>
<dl class="section note"><dt>Note</dt><dd>This is important when the pack should published using a <a class="el" href="createPackPublish.html#cp_KeilComPack">pack index service</a>. The pack importer will ignore all <b>&lt;vendor&gt;</b>.<b>&lt;name&gt;</b>.pdsc files that do fail when checking against the current PACK.xsd schema file and thus your pack will cannot be downloaded.</dd></dl>
<h1><a class="anchor" id="cp_LocalInstallation"></a>
Local Installation</h1>
<p>The easiest way to distribute a software pack is attaching it to an email or using other means of electronic distribution (for example using a company internal file server). The installation of a software pack is usually triggered by double-clicking the Pack file. The pack management tool is invoked and the Pack is installed on the local machine. After installation, the Pack will be shown in the list of installed packs (tool dependent). If the PDSC file does not contain a valid <code>&lt;url&gt;</code> element, a manual installation is required to update a software pack. Otherwise, pack management tools can check for updates on the server or the local machine that is specified by <code>&lt;url&gt;</code>.</p>
<div class="image">
<img src="LocalInstallation.png" alt=""/>
<div class="caption">
Local installation and update from URL</div></div>
<dl class="section note"><dt>Note</dt><dd>For automatic updates on a local machine, specify the <code>&lt;url&gt;</code> using the <a href="https://en.wikipedia.org/wiki/File_URI_scheme" target="_blank">file URI scheme</a>.</dd></dl>
<h1><a class="anchor" id="cp_WebDownload"></a>
Web Download</h1>
<p>Any web server can be used to host a software pack (specified by the <code>&lt;url&gt;</code> element in the PDSC file). At this location, the following files should be present:</p><ol type="1">
<li><b>&lt;vendor&gt;</b>.<b>&lt;name&gt;</b>.pdsc [required]: pack description file.</li>
<li><b>&lt;vendor&gt;</b>.<b>&lt;name&gt;</b>.<b>&lt;version&gt;</b>.pack [required]: pack file where <b>&lt;version&gt;</b> refers to the latest version specified in the PDSC file.</li>
<li><b>&lt;vendor&gt;</b>.pidx [optional]: list with all packs hosted and maintained by the vendor (refer to <a class="el" href="packIndexFile.html#pidxFile">Package Index File (pidx)</a>)</li>
</ol>
<p>All previous versions listed in the <b>&lt;releases&gt;</b> section of the PDSC file should be present at the <code>&lt;url&gt;</code> as well. This allows users to revert updates or to download a previous version of a software pack (for maintenance purposes).</p>
<p>The <b>&lt;vendor&gt;</b>.pidx allows you to publish multiple packs to a <a class="el" href="createPackPublish.html#cp_KeilComPack">Pack Index Service</a>.</p>
<h1><a class="anchor" id="cp_KeilComPack"></a>
Publish with Pack Index Service</h1>
<p>Several companies maintain a Pack Index Server to make packs available within tools or web pages. Once you are ready to deploy packs via such services, you may send the URL of the <b>&lt;vendor&gt;</b>.<b>&lt;name&gt;</b>.pdsc or <b>&lt;vendor&gt;</b>.pidx file to the following email addresses:</p>
<ul>
<li>for Arm and Keil tools and web pages email to <a href="#" onclick="location.href='mai'+'lto:'+'CMS'+'IS'+'@ar'+'m.'+'com'; return false;">CMSIS@arm.com</a></li>
<li>for IAR tools email to <a href="#" onclick="location.href='mai'+'lto:'+'CMS'+'IS'+'@ar'+'m.'+'com'; return false;">CMSIS@iar.com</a></li>
</ul>
<p>The *.pidx file allows you to change pack versions and add packs to your distribution list. All packs that are referenced in the .pidx file will be processed and validated. <b>Only packs that pass the <a class="el" href="packChk.html">packChk</a> and schema check</b> will become available via web pages and development tools.</p>
<p>For example, Arm uses the pack information to generate a list of available software packs. The following content will be processed in order to generate the web site (<a href="https://developer.arm.com/embedded/cmsis/cmsis-packs" target="_blank">https://developer.arm.com/embedded/cmsis/cmsis-packs</a>):</p><ul>
<li>Version</li>
<li>Release Notes</li>
<li>Devices</li>
<li>Boards</li>
<li>Examples</li>
<li>Software Components</li>
</ul>
<p>Please allow up to seven working days for the process. If the files contain any errors, you will be notified. Otherwise, the information is added to the index server.</p>
<h1><a class="anchor" id="cp_PackRehosting"></a>
Rehost pack to different URL</h1>
<p>Sometimes, it is necessary to rehost a pack (moving a pack from one URL to another). This implies that you need to change the &lt;url&gt; element in the PDSC file. To ensure that the pack is found by a <a class="el" href="createPackPublish.html#cp_KeilComPack">Pack Index Service</a>, follow this procedure:</p><ul>
<li>Create a new version of the pack: update the <b>&lt;vendor&gt;</b>.<b>&lt;name&gt;</b>.pdsc file with the new URL ("url_B") and make sure to increment the version</li>
<li>Place a copy of this latest <b>&lt;vendor&gt;</b>.<b>&lt;name&gt;</b>.pdsc at url_B and url_A (the original URL).</li>
<li>Place a copy of the new <b>&lt;vendor&gt;</b>.<b>&lt;name&gt;</b>.<b>&lt;version&gt;</b>.pack in url_B (only)</li>
<li>Copy all packs from url_A to url_B</li>
<li>Inform Arm about the new URL by either<ul>
<li>update the <b>&lt;vendor&gt;</b>.pidx with url_B for this pack <em>or</em> </li>
<li>email a link to the PDSC file if your company does not maintain a <b>&lt;vendor&gt;</b>.pidx</li>
</ul>
</li>
</ul>
<dl class="section note"><dt>Note</dt><dd><ul>
<li>PDSC and pack versions need to be accessible from the same new URL</li>
<li>You must keep url_A alive as is. But there is no need to maintain/update url_A going forward otherwise users with an old PDSC file will no longer find the pack versions.</li>
</ul>
</dd></dl>
<h1><a class="anchor" id="cp_HowWebDownloadWorks"></a>
Web Infra-structure</h1>
<p>Tool, software, or silicon vendors may provide a web infra-structure that lists packs that are available from multiple vendors. Companies like Arm or IAR provide a <a class="el" href="createPackPublish.html#cp_KeilComPack">Pack Index Service</a> that uses either a <b>&lt;vendor&gt;</b>.<b>&lt;name&gt;</b>.pdsc or a <b>&lt;vendor&gt;</b>.pidx file to obtain the latest pack versions. This information is used to make the packs available in the development tools (via a <b><a href="https://www.keil.com/mdk5/packinstaller/">Pack Installer</a></b>) and/or to publish information on certain web pages, for example a <b><a href="https://developer.arm.com/embedded/cmsis/cmsis-packs/devices" target="_blank">device list</a></b>.</p>
<p>The following diagram explains how these services are working behind the scene.</p>
<div class="image">
<img src="WebInstallation.png" alt=""/>
<div class="caption">
Web infra-structure for pack hosting services</div></div>
<dl class="section note"><dt>Note</dt><dd><ul>
<li>The &lt;url&gt; element in <b>&lt;vendor&gt;</b>.<b>&lt;name&gt;</b>.pdsc is the location where these services check for new packs. At this &lt;url&gt; location, an (unversioned) <b>&lt;vendor&gt;</b>.<b>&lt;name&gt;</b>.pdsc file and a (versioned) <b>&lt;vendor&gt;</b>.<b>&lt;name&gt;</b>.<b>&lt;version&gt;</b>.pack must be available.</li>
<li>The &lt;url&gt; is the page where the pack is downloaded. This means, if the URL or the PDSC/Pack files become unavailable, users are unable to download the pack.</li>
<li>When a new PDSC/Pack file is available, it is important to update the version number, otherwise the <a class="el" href="createPackPublish.html#cp_KeilComPack">Pack Index Service</a> will not recognize that the pack has changed.</li>
<li>Previous versions of a (versioned) <b>&lt;vendor&gt;</b>.<b>&lt;name&gt;</b>.<b>&lt;version&gt;</b>.pack should remain available.</li>
</ul>
</dd></dl>
<p>Depending on the implementation, the web infra-structure may provide index files with additional information:</p><ul>
<li><b>&lt;vendor&gt;</b>.vidx file (<a class="el" href="packIndexFile.html#vidxFile">Vendor Index File (vidx)</a>) lists pack index locations known by the service. Arm scans these locations every 24 hours to import new packs. If your location is not listed</li>
<li><a href="https://www.keil.com/pack/index.pidx">https://www.keil.com/pack/index.pidx</a> is a list of all packs that are correctly imported. If a pack does not appear, the pack did not pass the <a class="el" href="createPackPublish.html#cp_prerequisites">validation process</a>. </li>
</ul>
</div></div><!-- contents -->
</div><!-- PageDoc -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Tue Mar 17 2020 15:01:28 for CMSIS-Pack Version 1.6.1 by Arm Ltd. All rights reserved.
	<!--
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 
	-->
	</li>
  </ul>
</div>
</body>
</html>
